<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<rich:panel header="#{messages['complaint.list']}">
	<h:panelGrid>
		<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
	</h:panelGrid>

	<rich:dataTable id="data" var="obj" value="#{adminComplaintBean.complaintList}" rows="10" width="99%" rowKeyVar="rowNo">
		<rich:column style="text-align:center;width:80%;">
			<f:facet name="header">
				<h:outputText value="#{messages['title']}"></h:outputText>
			</f:facet>
				<t:outputText value="#{obj.title}"></t:outputText>
			<f:param value="#{obj.complaintId}" id="vcompId"/>
		</rich:column>
		<rich:column style="text-align:center;width:20%;">
			<f:facet name="header">
				<h:outputText value="#{messages['action']}"></h:outputText>
			</f:facet>
			<h:commandButton styleClass="button" value="#{messages['reply']}" action="#{adminComplaintBean.navReplyAction}" 
			actionListener="#{adminComplaintBean.navReplyActionListener}">
			</h:commandButton>
			<f:param value="#{obj.complaintId}" id="compId"/>
		</rich:column>
	</rich:dataTable>
	
	<rich:spacer height="30" />
	
	<rich:datascroller align="left"  for="data" maxPages="20" />
	<rich:spacer height="20" />
	<t:panelGrid>
		<h:commandButton styleClass="button" value="#{messages['back']}" action="#{adminComplaintBean.backAction}"></h:commandButton>
	</t:panelGrid>
	
	
</rich:panel>